const syncServices = require('./../services/sync');


const home = async (req, res )=>{
    const result = await syncServices.homeRender();
    res.render('sync',{
        data:result
    });
};

const cnodeSync = ( req, res ) => {
    const { hook } = req.body;
    syncServices.cnodeSync(hook).then( ret => {
        res.send({
            code:200,
            message:'success'
        });
    })
};

exports.cnodeSync = cnodeSync;
exports.home = home;